<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>TDZ</title>
</head>
<body>
<script>
//    var x=1;
//    function foo(x=x){
//        console.log(x);
//    }
//    foo();//x is not defined;

var x=1;
function foo(x){
    console.log(arguments[0]);//undefined
    console.log(x);
}
foo();//undefined
</script>
</body>
</html>